/*10 meios possiveis de criar um socket...*/

#define PORT_NUMBER_BELOW_ZERO -1
#define ERROR_RESOLVING_HOSTNAME -2
#define ERROR_CREATING_SOCKET_FILE_DESCRIPTOR -3
#define ERROR_CONNECTING_FILE_DESCRIPTOR -4
#define INVALID_FILE_DESCRIPTOR -5
#define NULL_HOSTNAME -6
#define INVALID_SOCKTYPE -7
#define ERROR_BINDING_SOCKET -8

#define socketProtocol 0

int unblockSocket(int sockDescriptor);

int newUnblockingUDPServerSocket( int port);
int newUnblockingTCPServerSocket( int port);
int newUDPServerSocket (int port);
int newTCPServerSocket (int port);
int newServerSocket (int type, int port);

int newUnblockingTCPSocket(char *hostname, int port);
int newUnblockingUDPSocket(char *hostname, int port);
int newUDPSocket (char *hostname, int port);
int newTCPSocket (char *hostname, int port);

int newSocket (int type, int port, char *hostname);
